<template>
	<view class="codefun-flex-col list-item space-y-106">
	  <view class="codefun-flex-row codefun-items-center space-x-16">
		  <view>{{userid}}</view>
	    <image class="avatar" :src="user.photourl"></image>
	    <view class="codefun-flex-col codefun-items-start space-y-14">
	     <view class="nickname">{{ user.username }}</view>
	     <view class="content">{{ comment2.remarkcontent }}</view>
	    </view>
	  </view>
	  <text class="codefun-self-start time">{{ comment2.time }}</text>
	</view>
</template>

<script>
	export default {
		data() {
					return {
						user:[],
						userid:'',
					};
				},
		name:"comment2",
		props: {
			comment2: {
				type: Object,
				required: true
			}
		},
		mounted() {
			
			let that = this;
			  let userid = this.comment2.userid;
	
			uni.request({
				url:'/usr/getUsrById/'+userid,
				method: 'GET',				
				success: (res) => {
				console.log(2222,res)
					that.user = res.data				
				}
			})			
		}
	}
</script>

<style lang="scss">
    .list-item {
      padding: 13.95rpx 0 27.91rpx 13.95rpx;
      background-color: #edfaff;
      border-radius: 17.44rpx;
      border: solid 8.72rpx #5fb1cf;
      .space-x-16 {
        & > view:not(:first-child),
        & > text:not(:first-child),
        & > image:not(:first-child) {
          margin-left: 27.91rpx;
        }
        .avatar {
          border-radius: 50%;
          width: 92.44rpx;
          height: 92.44rpx;
        }
        .space-y-14 {
          & > view:not(:first-child),
          & > text:not(:first-child),
          & > image:not(:first-child) {
            margin-top: 24.42rpx;
          }
          .nickname{
            font-size: 31.4rpx;
            font-family: AlimamaShuHeiTi;
            line-height: 28.78rpx;
            color: #5fb1cf;
         
            margin-left: 10.47rpx;
          }
          .content {
            font-size: 24.42rpx;
            font-family: AlimamaShuHeiTi;
            line-height: 22.67rpx;
            color: #468aa3;
          }
        }
      }
      .time {
        font-size: 24.42rpx;
        font-family: AlimamaShuHeiTi;
        line-height: 17.44rpx;
        color: #5fb1cf;
     
        margin-left: 20.93rpx;
      }
    }
    .space-y-106 {
      & > view:not(:first-child),
      & > text:not(:first-child),
      & > image:not(:first-child) {
        margin-top: 184.88rpx;
      }
    }
</style>